package ${modelPackageName};

<#if table.columns??>
    <#list table.columns as item>
        <#if item.fieldType == 'Date'>
import java.util.Date;
        </#if>
    </#list>
</#if>

/**
* ${(table.comment)!}
*
* User: ${userName}
* DateTime: ${dataTime}
*
*/
public class ${table.className!} <#if table.ids?size gt 1 >extends ${table.className!}Key</#if> {

    <#if table.ids?size gt 1 >
    private ${table.className!}Key key;
    </#if>

    <#if table.columns??>
    <#list table.columns as item>
        <#assign isBool=true>
        <#list table.ids as id>
            <#if table.ids?size gt 1 && id.fieldName == item.fieldName >
                <#assign isBool=false>
            </#if>
        </#list>
        <#if isBool>
    // ${item.comment!}
    private ${item.fieldType!} ${item.fieldName!};
        </#if>
    </#list>

    <#if table.ids?size gt 1 >
    public ${table.className!}Key getKey() {
        return key;
    }

    public void setKey(${table.className!}Key key) {
        this.key = key;
    }
    </#if>

    <#list table.columns as item>
        <#assign isBool=true>
        <#list table.ids as id>
            <#if table.ids?size gt 1 && id.fieldName == item.fieldName >
                <#assign isBool=false>
            </#if>
        </#list>
        <#if isBool>
    public ${item.fieldType!} get${item.fieldName! ? cap_first}() {
        return ${item.fieldName!};
    }

    public void set${item.fieldName! ? cap_first}(${item.fieldType!} ${item.fieldName!}) {
        this.${item.fieldName!} = ${item.fieldName!};
    }
        </#if>
    </#list>
    </#if>
}
